/*
 * mcs.h : uRobot Motion Controller Service header.
 * Originally developped for the uRobot project.
 * Parts of the code are originated from GMediaServer from Oskar Liljeblad.
 * Copyright (C) 2011-2012 Seong-Woo Kim <libero@deu.ac.kr>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#ifndef MCS_H_
#define MCS_H_

#define MCS_DESCRIPTION \
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" \
"<scpd xmlns=\"urn:schemas-upnp-org:service-1-0\">" \
"  <specVersion>" \
"    <major>1</major>" \
"    <minor>0</minor>" \
"  </specVersion>" \
"  <actionList>" \
"    <action>" \
"      <name>GoForward</name>" \
"      <argumentList>" \
"        <argument>" \
"          <name>Command</name>" \
"          <direction>in</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Command</relatedStateVariable>" \
"        </argument>" \
"        <argument>" \
"          <name>Status</name>" \
"          <direction>out</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Status</relatedStateVariable>" \
"        </argument>" \
"      </argumentList>" \
"    </action>" \
"    <action>" \
"      <name>GoBackward</name>" \
"      <argumentList>" \
"        <argument>" \
"          <name>Command</name>" \
"          <direction>in</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Command</relatedStateVariable>" \
"        </argument>" \
"        <argument>" \
"          <name>Status</name>" \
"          <direction>out</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Status</relatedStateVariable>" \
"        </argument>" \
"      </argumentList>" \
"    </action>" \
"    <action>" \
"      <name>Stop</name>" \
"      <argumentList>" \
"        <argument>" \
"          <name>Command</name>" \
"          <direction>in</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Command</relatedStateVariable>" \
"        </argument>" \
"        <argument>" \
"          <name>Status</name>" \
"          <direction>out</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Status</relatedStateVariable>" \
"        </argument>" \
"      </argumentList>" \
"    </action>" \
"    <action>" \
"      <name>TurnLeft</name>" \
"      <argumentList>" \
"        <argument>" \
"          <name>Command</name>" \
"          <direction>in</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Command</relatedStateVariable>" \
"        </argument>" \
"        <argument>" \
"          <name>Status</name>" \
"          <direction>out</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Status</relatedStateVariable>" \
"        </argument>" \
"      </argumentList>" \
"    </action>" \
"    <action>" \
"      <name>TurnRight</name>" \
"      <argumentList>" \
"        <argument>" \
"          <name>Command</name>" \
"          <direction>in</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Command</relatedStateVariable>" \
"        </argument>" \
"        <argument>" \
"          <name>Status</name>" \
"          <direction>out</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Status</relatedStateVariable>" \
"        </argument>" \
"      </argumentList>" \
"    </action>" \
"    <action>" \
"      <name>GetMotionInfo</name>" \
"      <argumentList>" \
"        <argument>" \
"          <name>MotionID</name>" \
"          <direction>out</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_MotionID</relatedStateVariable>" \
"        </argument>" \
"        <argument>" \
"          <name>Direction</name>" \
"          <direction>out</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Direction</relatedStateVariable>" \
"        </argument>" \
"        <argument>" \
"          <name>Status</name>" \
"          <direction>out</direction>" \
"          <relatedStateVariable>A_ARG_TYPE_Status</relatedStateVariable>" \
"        </argument>" \
"      </argumentList>" \
"    </action>" \
"  </actionList>" \
"  <serviceStateTable>" \
"    <stateVariable sendEvents=\"no\">" \
"      <name>A_ARG_TYPE_Command</name>" \
"      <dataType>i4</dataType>" \
"    </stateVariable>" \
"    <stateVariable sendEvents=\"no\">" \
"      <name>A_ARG_TYPE_Status</name>" \
"     <dataType>string</dataType>" \
"      <allowedValueList>" \
"        <allowedValue>OK</allowedValue>" \
"        <allowedValue>ContentFormatMismatch</allowedValue>" \
"        <allowedValue>InsufficientBandwidth</allowedValue>" \
"        <allowedValue>UnreliableChannel</allowedValue>" \
"        <allowedValue>Unknown</allowedValue>" \
"      </allowedValueList>" \
"    </stateVariable>" \
"    <stateVariable sendEvents=\"no\">" \
"      <name>A_ARG_TYPE_MotionID</name>" \
"      <dataType>i4</dataType>" \
"    </stateVariable>" \
"    <stateVariable sendEvents=\"no\">" \
"      <name>A_ARG_TYPE_Direction</name>" \
"      <dataType>string</dataType>" \
"      <allowedValueList>" \
"        <allowedValue>Input</allowedValue>" \
"        <allowedValue>Output</allowedValue>" \
"      </allowedValueList>" \
"    </stateVariable>" \
"  </serviceStateTable>" \
"</scpd>"

#define MCS_DESCRIPTION_LEN strlen (MCS_DESCRIPTION)

#define MCS_LOCATION "/web/mcs.xml"

#define MCS_SERVICE_ID "urn:upnp-org:serviceId:MotionController"
#define MCS_SERVICE_TYPE "urn:schemas-upnp-org:service:MotionController:1"

#endif /* MCS_H_ */
